package com.grgbanking.encryp;

import com.grgbanking.encryp.netty.server.NettyServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

@SpringBootApplication
public class EncrypApplication {

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext context = SpringApplication.run(EncrypApplication.class, args);
        Runnable nettyServerRunner = context.getBean(Runnable.class);
        new Thread(nettyServerRunner).start();
    }

}